home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / std / c++ / 1110 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  2.0 KB

  1. Path: fido.asd.sgi.com!austern
  2. From: jpb@iris8.msi.com (Jan Bielawski)
  3. Newsgroups: comp.std.c++
  4. Subject: Re: Template Syntax
  5. Date: 16 Apr 1996 13:13:36 PDT
  6. Organization: Biosym Technologies, Inc.
  7. Approved: austern@isolde.mti.sgi.com
  8. Message-ID: <1996Apr15.235607.11220@biosym.com>
  9. References: <199604102351.QAA11178@netcom15.netcom.com>
  10. NNTP-Posting-Host: isolde.mti.sgi.com
  11. X-Original-Date: Mon, 15 Apr 1996 23:56:07 GMT
  12. Apparently-To: comp-std-c++@uunet.uu.net
  13. X-Auth: PGPMoose V1.1 PGP comp.std.c++
  14.     iQBVAwUBMXP/cUy4NqrwXLNJAQEnFQIAsqhso2flX4+WvFxf0AtJZd0qs/uSGMI6
  15.     U0Kr/+e2Yef+ThL0WQ9+S2wy3LgqqxZihiiOInYq+hlIZSrOIMJ8NQ==
  16.     =cUd7
  17. Originator: austern@isolde.mti.sgi.com
  18.  
  19. In article <199604102351.QAA11178@netcom15.netcom.com> Scott Meyers <smeyers@netcom.com> writes:
  20. <I was under the impression that the use of a template name inside the
  21. <definition of a class template was implicitly considered to be qualified
  22. <by the template parameter(s).  For example, I thought that in
  23. <
  24. <  template <class T>
  25. <  class Array {
  26. <  public:
  27. <    Array operator=(const Array& rhs);
  28. <    ...
  29. <  };
  30. <  
  31. <the declaration of operator= was legal, because the use of the token
  32. <"Array" as a return type and a paramter was implicitly treated as if it
  33. <were "Array<T>." Many compilers accept this, but I'm told that several
  34. <reject it, and I can't find language in the January DWP that allows it. 
  35.  
  36. Doesn't section 14.2.1 ("Locally declared names") explicitly allow it?
  37. -- 
  38. Jan Bielawski
  39. Molecular Simulations, Inc.   )\._.,--....,'``.         | http://www.msi.com
  40. San Diego, CA                /,   _.. \   _\  ;`._ ,.   | ph.: (619) 458-9990
  41. jpb@msi.com              fL `._.-(,_..'--(,_..'`-.;.'   | fax: (619) 458-0136
  42. -- 
  43. ---
  44. [ comp.std.c++ is moderated.  To submit articles: Try just posting with your 
  45.                 newsreader.  If that fails, use mailto:std-c++@ncar.ucar.edu
  46.   comp.std.c++ FAQ: http://reality.sgi.com/austern/std-c++/faq.html
  47.   Moderation policy: http://reality.sgi.com/austern/std-c++/policy.html
  48.   Comments? mailto:std-c++-request@ncar.ucar.edu 
  49. ]
  50.